package Classes.GameViews.ViewDisplayers// ActionScript file
{
	import Classes.GameDatas.GameData;
	import Classes.GameViews.GV_Map;
	import Classes.GameViews.GameView;
	
	import flash.events.Event;
	import flash.events.MouseEvent;

	/**
	 *游戏数据单位显示对象类 
	 * @author 葛增文
	 * 
	 */	
	public class ViewDisplayer extends GameView
	{
		private var _gameData:GameData;/*对应数据*/
		public function ViewDisplayer(gameData:GameData):void
		{
			this._gameData=gameData;
			this.init();
		}
		
		private function init():void
		{
			
		}
		
		/**
		 *重新绘制 
		 * 
		 */
		public function redraw():void
		{
			this.beginDrawMyView();
		}
		
		/**
		 *开始绘制自身的视图 
		 * 
		 */
		protected function beginDrawMyView():void
		{
			
		}
		
		public function release():void
		{
			this._gameData=null;
			while(this.numChildren)this.removeChildAt(0);
			if(this.parent)this.parent.removeChild(this);
		}

		/*getter & setter*/
		public function get gameData():GameData
		{
			return _gameData;
		}


	}
}